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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: C = None
        self.w: H = None
        self.x: E = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: C = None
        self.w: H = None
        self.x: E = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.x: C = None
        self.txt = txt

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

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