class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.t: F = None
        self.u: E = None
        self.o: F = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.o: D = None
        self.y: E = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.o: D = None
        self.y: E = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

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