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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

b.z = l
b.y = f
b.u = j
b.x = a
i.u = c
i.r = b
i.s = j
g.t = c
j.y = c
j.o = b
c.s = j
l.y = c
l.o = b
a.z = j
a.u = j
a.y = g
a.x = b
f.t = c
n.u = c
n.r = b
n.s = l
assert l.o.x.u.o.x.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

b.z = l
b.y = f
b.u = j
b.x = a
i.u = c
i.r = b
i.s = j
g.t = c
j.y = c
j.o = b
c.s = j
l.y = c
l.o = b
a.z = j
a.u = j
a.y = g
a.x = b
f.t = c
n.u = c
n.r = b
n.s = l
assert l.o.x.u.o.x.y.t.txt == "c"