class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.o: B = None
        self.u: D = None
        self.w: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.r: F = None
        self.q: C = None
        self.x: A = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.r: F = None
        self.q: C = None
        self.x: A = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

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