class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.r: C = None
        self.u: C = None
        self.y: G = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

a = A("a")
c = B("c")
k = C("k")
d = D("d")
l = E("l")
f = F("f")
e = G("e")
n = D("n")

a.p = n
a.r = n
a.y = e
a.o = e
c.x = a
c.u = k
c.r = k
c.o = k
c.p = k
c.q = l
k.x = e
d.z = k
d.o = l
d.x = n
d.t = e
l.p = c
l.o = c
l.t = c
l.q = a
l.r = k
l.w = f
l.s = d
f.p = e
f.y = e
f.x = k
f.r = k
f.u = k
f.s = c
f.o = d
e.s = a
e.w = f
e.q = k
e.x = k
n.z = k
n.o = l
n.x = d
n.t = e
assert e.w.o.z.x.s.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.r: C = None
        self.u: C = None
        self.y: G = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

a = A("a")
c = B("c")
k = C("k")
d = D("d")
l = E("l")
f = F("f")
e = G("e")
n = D("n")

a.p = n
a.r = n
a.y = e
a.o = e
c.x = a
c.u = k
c.r = k
c.o = k
c.p = k
c.q = l
k.x = e
d.z = k
d.o = l
d.x = n
d.t = e
l.p = c
l.o = c
l.t = c
l.q = a
l.r = k
l.w = f
l.s = d
f.p = e
f.y = e
f.x = k
f.r = k
f.u = k
f.s = c
f.o = d
e.s = a
e.w = f
e.q = k
e.x = k
n.z = k
n.o = l
n.x = d
n.t = e
assert e.w.o.z.x.s.p.o.txt == "l"