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

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

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

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

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

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

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

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

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

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

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

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

d.v = e
d.x = m
e.t = k
e.y = m
n.t = j
n.q = e
f.u = d
b.u = f
b.v = f
b.o = f
b.r = e
m.t = k
m.y = e
l.t = n
l.q = m
k.u = f
k.v = f
k.o = f
k.r = m
a.t = n
a.q = e
j.t = n
j.q = m
assert l.t.t.t.q.y.y.txt == "e"