class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: C = None
        self.v: E = None
        self.y: A = None
        self.t: G = None
        self.w: A = None
        self.r: H = None
        self.x: F = None
        self.txt = txt

c = A("c")
i = B("i")
g = C("g")
e = D("e")
d = E("d")
m = F("m")
a = G("a")
f = H("f")
k = I("k")

c.y = d
c.u = m
i.o = g
g.p = m
g.w = i
g.v = f
e.w = g
d.o = g
d.s = f
m.z = k
m.p = k
m.q = a
a.v = f
a.x = f
f.o = g
f.t = g
k.z = f
k.r = f
k.o = g
k.v = d
k.y = c
k.w = c
k.t = a
k.x = m
assert i.o.w.o.v.o.w.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: C = None
        self.v: E = None
        self.y: A = None
        self.t: G = None
        self.w: A = None
        self.r: H = None
        self.x: F = None
        self.txt = txt

c = A("c")
i = B("i")
g = C("g")
e = D("e")
d = E("d")
m = F("m")
a = G("a")
f = H("f")
k = I("k")

c.y = d
c.u = m
i.o = g
g.p = m
g.w = i
g.v = f
e.w = g
d.o = g
d.s = f
m.z = k
m.p = k
m.q = a
a.v = f
a.x = f
f.o = g
f.t = g
k.z = f
k.r = f
k.o = g
k.v = d
k.y = c
k.w = c
k.t = a
k.x = m
assert i.o.w.o.v.o.w.o.w.txt == "i"