class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.u: F = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: H = None
        self.v: D = None
        self.q: D = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: C = None
        self.u: D = None
        self.q: B = None
        self.txt = txt

e = A("e")
i = B("i")
d = C("d")
j = D("j")
g = E("g")
f = F("f")
k = G("k")
b = H("b")

e.t = j
e.p = j
e.q = d
e.u = f
e.v = i
i.t = d
i.r = k
i.y = f
d.y = i
d.r = k
d.v = k
d.z = k
d.s = f
d.o = f
d.t = b
d.x = b
j.z = d
g.z = i
g.v = j
g.s = f
f.w = g
f.z = b
f.v = j
f.q = j
f.x = k
k.x = d
b.x = f
b.w = d
b.u = j
b.q = i
assert k.x.z.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.u: F = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: H = None
        self.v: D = None
        self.q: D = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: C = None
        self.u: D = None
        self.q: B = None
        self.txt = txt

e = A("e")
i = B("i")
d = C("d")
j = D("j")
g = E("g")
f = F("f")
k = G("k")
b = H("b")

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