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

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

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

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

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

i = A("i")
f = B("f")
m = C("m")
d = D("d")
l = E("l")
n = C("n")
b = C("b")
k = B("k")
j = C("j")

i.t = m
f.x = l
f.v = d
m.x = l
m.v = b
m.o = f
m.y = i
d.v = b
d.z = j
l.u = k
l.q = k
l.s = f
n.x = l
n.v = b
n.o = k
n.y = i
b.x = l
b.v = n
b.o = k
b.y = i
k.x = l
k.v = d
j.x = l
j.v = b
j.o = k
j.y = i
assert i.t.o.v.v.y.t.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

i = A("i")
f = B("f")
m = C("m")
d = D("d")
l = E("l")
n = C("n")
b = C("b")
k = B("k")
j = C("j")

i.t = m
f.x = l
f.v = d
m.x = l
m.v = b
m.o = f
m.y = i
d.v = b
d.z = j
l.u = k
l.q = k
l.s = f
n.x = l
n.v = b
n.o = k
n.y = i
b.x = l
b.v = n
b.o = k
b.y = i
k.x = l
k.v = d
j.x = l
j.v = b
j.o = k
j.y = i
assert i.t.o.v.v.y.t.x.s.txt == "f"