class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.o: C = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.z: F = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.p: F = None
        self.u: F = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.r: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

a = A("a")
k = B("k")
l = C("l")
c = D("c")
j = E("j")
n = F("n")
i = D("i")
d = B("d")
g = C("g")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.o: C = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.z: F = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.p: F = None
        self.u: F = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.r: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

a = A("a")
k = B("k")
l = C("l")
c = D("c")
j = E("j")
n = F("n")
i = D("i")
d = B("d")
g = C("g")
e = F("e")

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