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

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

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

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

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

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

m.s = j
m.x = b
m.o = c
i.u = j
i.y = g
i.r = m
b.q = a
b.t = g
b.v = e
e.u = c
e.y = a
e.o = g
e.v = m
a.v = b
a.u = e
g.u = j
g.r = j
g.y = i
j.s = m
j.x = b
j.o = c
n.u = b
n.y = a
n.o = g
n.v = m
c.q = a
c.t = i
c.v = e
assert j.s.o.q.v.q.v.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

m.s = j
m.x = b
m.o = c
i.u = j
i.y = g
i.r = m
b.q = a
b.t = g
b.v = e
e.u = c
e.y = a
e.o = g
e.v = m
a.v = b
a.u = e
g.u = j
g.r = j
g.y = i
j.s = m
j.x = b
j.o = c
n.u = b
n.y = a
n.o = g
n.v = m
c.q = a
c.t = i
c.v = e
assert j.s.o.q.v.q.v.t.y.txt == "i"