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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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