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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.p: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

l = A("l")
g = B("g")
b = C("b")
n = D("n")
k = E("k")
a = F("a")
f = G("f")
c = H("c")
m = G("m")
i = D("i")

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.p: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

l = A("l")
g = B("g")
b = C("b")
n = D("n")
k = E("k")
a = F("a")
f = G("f")
c = H("c")
m = G("m")
i = D("i")

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