class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.s: D = None
        self.x: E = None
        self.r: F = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.r: A = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.s: D = None
        self.x: E = None
        self.r: F = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.r: A = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

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