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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.z: D = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: E = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

e = A("e")
c = B("c")
i = C("i")
g = D("g")
n = E("n")
h = F("h")
l = D("l")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.z: D = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: E = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

e = A("e")
c = B("c")
i = C("i")
g = D("g")
n = E("n")
h = F("h")
l = D("l")

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