class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.r: H = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.p: A = None
        self.q: B = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: A = None
        self.q: H = None
        self.t: C = None
        self.y: F = None
        self.p: C = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.p: A = None
        self.r: G = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.r: H = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.p: A = None
        self.q: B = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: A = None
        self.q: H = None
        self.t: C = None
        self.y: F = None
        self.p: C = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.p: A = None
        self.r: G = None
        self.x: E = None
        self.txt = txt

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

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