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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.v: C = None
        self.y: F = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: C = None
        self.y: B = None
        self.r: C = None
        self.x: G = None
        self.u: C = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.v: C = None
        self.y: F = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: C = None
        self.y: B = None
        self.r: C = None
        self.x: G = None
        self.u: C = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

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