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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.v: B = None
        self.t: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

l.o = i
l.t = m
l.x = j
g.w = m
g.p = m
g.v = m
g.t = c
g.u = e
e.v = f
e.s = j
e.y = c
i.o = l
j.v = c
j.z = l
f.v = b
f.s = c
f.y = j
n.o = i
n.t = m
n.x = j
m.w = g
m.p = g
m.v = g
m.t = c
m.u = f
b.v = e
b.s = j
b.y = c
c.v = j
c.z = n
assert i.o.o.o.t.u.y.v.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.v: B = None
        self.t: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

l.o = i
l.t = m
l.x = j
g.w = m
g.p = m
g.v = m
g.t = c
g.u = e
e.v = f
e.s = j
e.y = c
i.o = l
j.v = c
j.z = l
f.v = b
f.s = c
f.y = j
n.o = i
n.t = m
n.x = j
m.w = g
m.p = g
m.v = g
m.t = c
m.u = f
b.v = e
b.s = j
b.y = c
c.v = j
c.z = n
assert i.o.o.o.t.u.y.v.z.x.txt == "j"