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

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

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

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

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

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

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

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

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

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

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

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

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

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

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