class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.u: C = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

g = A("g")
h = B("h")
k = C("k")
n = D("n")
e = E("e")
c = F("c")
b = F("b")
d = B("d")

g.y = k
g.u = d
g.z = n
g.t = n
h.o = c
h.u = b
h.z = k
k.y = e
n.p = k
n.v = k
e.z = h
e.w = k
e.p = c
c.w = e
c.o = g
c.p = g
c.u = k
c.t = n
b.w = e
b.o = g
b.p = g
b.u = k
b.t = n
d.o = b
d.u = b
d.z = k
assert c.t.v.y.z.u.o.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.u: C = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

g = A("g")
h = B("h")
k = C("k")
n = D("n")
e = E("e")
c = F("c")
b = F("b")
d = B("d")

g.y = k
g.u = d
g.z = n
g.t = n
h.o = c
h.u = b
h.z = k
k.y = e
n.p = k
n.v = k
e.z = h
e.w = k
e.p = c
c.w = e
c.o = g
c.p = g
c.u = k
c.t = n
b.w = e
b.o = g
b.p = g
b.u = k
b.t = n
d.o = b
d.u = b
d.z = k
assert c.t.v.y.z.u.o.y.y.txt == "e"