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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.p: B = None
        self.z: B = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.p: B = None
        self.z: B = None
        self.u: C = None
        self.txt = txt

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

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

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