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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

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