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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.q: G = None
        self.w: A = None
        self.p: A = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.r: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.q: G = None
        self.w: A = None
        self.p: A = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

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

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

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