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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.w: D = None
        self.q: B = None
        self.txt = txt

b = A("b")
k = B("k")
f = C("f")
j = D("j")
e = E("e")
c = A("c")
h = C("h")

b.y = c
b.t = h
b.r = e
b.u = e
k.w = j
f.o = b
f.y = k
f.w = c
f.r = j
f.p = e
j.v = c
e.r = k
e.x = k
e.q = k
e.w = j
c.y = b
c.t = h
c.r = e
c.u = e
h.o = b
h.w = b
h.y = k
h.r = j
h.p = e
assert c.y.t.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: C = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.w: D = None
        self.q: B = None
        self.txt = txt

b = A("b")
k = B("k")
f = C("f")
j = D("j")
e = E("e")
c = A("c")
h = C("h")

b.y = c
b.t = h
b.r = e
b.u = e
k.w = j
f.o = b
f.y = k
f.w = c
f.r = j
f.p = e
j.v = c
e.r = k
e.x = k
e.q = k
e.w = j
c.y = b
c.t = h
c.r = e
c.u = e
h.o = b
h.w = b
h.y = k
h.r = j
h.p = e
assert c.y.t.o.t.txt == "h"