class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: G = None
        self.w: H = None
        self.v: B = None
        self.s: D = None
        self.r: H = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: H = None
        self.v: D = None
        self.t: C = None
        self.y: C = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.p: H = None
        self.q: F = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: H = None
        self.v: D = None
        self.t: C = None
        self.y: C = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.p: H = None
        self.q: F = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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