class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.t: C = None
        self.q: E = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.t: C = None
        self.q: E = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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