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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

l.y = g
i.r = c
i.u = n
k.w = l
k.v = g
c.r = a
c.z = l
c.t = f
c.o = g
c.w = g
c.p = g
b.y = i
b.t = i
b.u = i
f.s = k
f.z = k
g.r = b
g.z = l
g.t = f
g.o = c
g.w = c
g.p = c
d.y = c
n.y = i
n.t = i
n.u = i
a.y = i
a.t = i
a.u = i
assert l.y.t.s.v.r.u.r.r.y.u.txt == "n"