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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.p: F = None
        self.v: G = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.r: E = None
        self.s: E = None
        self.p: G = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.u: C = None
        self.p: B = None
        self.y: A = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.p: F = None
        self.v: G = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.r: E = None
        self.s: E = None
        self.p: G = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.u: C = None
        self.p: B = None
        self.y: A = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

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