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

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

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

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

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

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

h.q = j
h.o = a
h.v = b
h.y = b
h.x = d
a.p = d
a.v = d
a.y = b
a.r = l
b.w = h
b.o = f
e.s = l
e.p = b
e.r = m
e.v = d
e.z = a
d.t = l
j.s = a
j.p = b
j.r = n
j.v = d
j.z = l
m.s = l
m.z = l
m.p = b
m.r = j
m.v = d
n.s = a
n.z = a
n.p = b
n.r = j
n.v = d
l.p = d
l.v = d
l.y = b
l.r = a
f.q = m
f.o = l
f.v = b
f.y = b
f.x = d
assert l.v.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.v: C = None
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

h.q = j
h.o = a
h.v = b
h.y = b
h.x = d
a.p = d
a.v = d
a.y = b
a.r = l
b.w = h
b.o = f
e.s = l
e.p = b
e.r = m
e.v = d
e.z = a
d.t = l
j.s = a
j.p = b
j.r = n
j.v = d
j.z = l
m.s = l
m.z = l
m.p = b
m.r = j
m.v = d
n.s = a
n.z = a
n.p = b
n.r = j
n.v = d
l.p = d
l.v = d
l.y = b
l.r = a
f.q = m
f.o = l
f.v = b
f.y = b
f.x = d
assert l.v.t.p.txt == "d"