class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.r: A = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

b = A("b")
g = B("g")
l = C("l")
m = D("m")
f = E("f")
n = A("n")
h = D("h")
i = E("i")
c = B("c")
j = C("j")

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

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

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

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

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

b = A("b")
g = B("g")
l = C("l")
m = D("m")
f = E("f")
n = A("n")
h = D("h")
i = E("i")
c = B("c")
j = C("j")

b.o = h
b.y = g
b.r = n
b.z = l
b.t = i
g.t = b
g.r = m
g.v = c
l.y = j
l.s = j
m.r = j
m.y = i
f.o = l
f.r = c
f.p = c
f.s = c
f.q = i
n.o = h
n.y = c
n.r = b
n.z = l
n.t = f
h.r = j
h.y = f
i.o = l
i.r = c
i.p = g
i.s = g
i.q = f
c.t = b
c.r = h
c.v = g
j.y = l
j.s = l
assert h.y.p.t.t.s.t.o.txt == "h"