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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.t: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

b = A("b")
j = B("j")
f = C("f")
c = D("c")
i = E("i")
h = B("h")
a = D("a")
d = E("d")
k = D("k")

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.t: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

b = A("b")
j = B("j")
f = C("f")
c = D("c")
i = E("i")
h = B("h")
a = D("a")
d = E("d")
k = D("k")

b.r = f
b.x = h
b.o = h
j.v = b
j.q = b
j.u = a
j.s = h
j.x = d
f.s = d
f.x = j
f.t = i
f.w = k
c.z = b
c.s = b
c.q = a
i.p = h
i.u = a
i.y = j
i.t = d
h.v = b
h.q = b
h.u = k
h.s = j
h.x = d
a.z = b
a.s = b
a.q = k
d.p = h
d.u = c
d.y = j
d.t = i
k.z = b
k.s = b
k.q = a
assert c.s.r.t.txt == "i"