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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

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

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

g.r = e
d.x = g
d.o = g
d.t = k
d.r = e
d.w = a
f.p = l
f.y = d
f.z = a
f.q = j
a.u = f
a.y = k
a.o = h
h.s = g
h.q = d
h.x = a
h.y = l
h.t = l
j.r = d
k.p = b
k.z = b
k.y = e
k.q = j
b.u = k
b.y = k
b.o = h
e.x = g
e.o = j
e.t = f
e.r = d
e.w = l
l.u = f
l.y = f
l.o = h
assert b.o.q.r.x.r.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

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

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

g.r = e
d.x = g
d.o = g
d.t = k
d.r = e
d.w = a
f.p = l
f.y = d
f.z = a
f.q = j
a.u = f
a.y = k
a.o = h
h.s = g
h.q = d
h.x = a
h.y = l
h.t = l
j.r = d
k.p = b
k.z = b
k.y = e
k.q = j
b.u = k
b.y = k
b.o = h
e.x = g
e.o = j
e.t = f
e.r = d
e.w = l
l.u = f
l.y = f
l.o = h
assert b.o.q.r.x.r.r.o.txt == "g"