class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.r: C = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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