class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.y: F = None
        self.v: F = None
        self.z: F = None
        self.x: H = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.y: F = None
        self.v: F = None
        self.z: F = None
        self.x: H = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

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

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

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