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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.y: B = None
        self.v: F = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
m = D("m")
b = E("b")
d = F("d")
n = G("n")
g = H("g")
e = E("e")

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.y: B = None
        self.v: F = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
m = D("m")
b = E("b")
d = F("d")
n = G("n")
g = H("g")
e = E("e")

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