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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.v: G = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.r: B = None
        self.v: E = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.v: G = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.r: B = None
        self.v: E = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.s: A = None
        self.txt = txt

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

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