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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.v: H = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.x: B = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.v: H = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.x: B = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

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