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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.r: C = None
        self.z: G = None
        self.w: D = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.r: C = None
        self.z: G = None
        self.w: D = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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