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

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

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

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

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

b = A("b")
i = B("i")
g = C("g")
a = D("a")
m = E("m")
j = E("j")
e = B("e")
c = B("c")
l = C("l")
d = A("d")

b.u = d
i.s = d
i.r = d
i.v = a
i.o = b
i.x = c
g.z = l
g.x = b
a.q = i
a.v = i
a.o = m
m.o = g
m.p = e
m.q = b
m.v = d
j.o = l
j.p = c
j.q = b
j.v = b
e.s = b
e.o = b
e.v = a
e.r = d
e.x = c
c.s = b
c.o = b
c.v = a
c.r = d
c.x = e
l.z = g
l.x = b
d.u = b
assert c.o.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

b = A("b")
i = B("i")
g = C("g")
a = D("a")
m = E("m")
j = E("j")
e = B("e")
c = B("c")
l = C("l")
d = A("d")

b.u = d
i.s = d
i.r = d
i.v = a
i.o = b
i.x = c
g.z = l
g.x = b
a.q = i
a.v = i
a.o = m
m.o = g
m.p = e
m.q = b
m.v = d
j.o = l
j.p = c
j.q = b
j.v = b
e.s = b
e.o = b
e.v = a
e.r = d
e.x = c
c.s = b
c.o = b
c.v = a
c.r = d
c.x = e
l.z = g
l.x = b
d.u = b
assert c.o.u.u.u.u.txt == "b"