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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.txt = txt

f = A("f")
a = B("a")
l = C("l")
e = D("e")
n = E("n")
k = C("k")
h = E("h")
g = C("g")
j = A("j")

f.v = k
a.z = k
l.q = j
l.r = j
l.o = a
l.p = g
e.w = j
n.r = k
n.o = h
k.q = j
k.r = j
k.o = a
k.p = g
h.r = l
h.o = n
g.q = j
g.r = f
g.o = a
g.p = k
j.v = k
assert l.o.z.o.z.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.txt = txt

f = A("f")
a = B("a")
l = C("l")
e = D("e")
n = E("n")
k = C("k")
h = E("h")
g = C("g")
j = A("j")

f.v = k
a.z = k
l.q = j
l.r = j
l.o = a
l.p = g
e.w = j
n.r = k
n.o = h
k.q = j
k.r = j
k.o = a
k.p = g
h.r = l
h.o = n
g.q = j
g.r = f
g.o = a
g.p = k
j.v = k
assert l.o.z.o.z.o.z.txt == "k"