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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

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

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