class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.r: E = None
        self.q: D = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.q: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.q: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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