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

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

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

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

f = A("f")
n = B("n")
j = C("j")
a = D("a")
k = B("k")
g = A("g")
m = D("m")
c = A("c")
d = A("d")
e = B("e")

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

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

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

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

f = A("f")
n = B("n")
j = C("j")
a = D("a")
k = B("k")
g = A("g")
m = D("m")
c = A("c")
d = A("d")
e = B("e")

f.o = d
f.z = j
f.x = e
n.u = f
j.p = c
j.r = a
a.v = j
a.t = j
a.y = m
k.u = f
g.o = f
g.z = j
g.x = k
m.v = j
m.t = j
m.y = a
c.o = d
c.z = j
c.x = e
d.o = c
d.z = j
d.x = e
e.u = d
assert m.y.y.y.v.p.z.r.txt == "a"