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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.o: E = None
        self.t: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.o: E = None
        self.t: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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