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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.x: E = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.s: G = None
        self.t: C = None
        self.y: C = None
        self.txt = txt

n = A("n")
k = B("k")
i = C("i")
h = D("h")
b = E("b")
l = F("l")
f = G("f")
e = E("e")
a = G("a")

n.r = l
n.t = h
n.o = h
n.u = h
n.z = h
n.x = h
n.s = b
k.p = f
i.o = e
i.v = k
i.u = h
h.u = n
b.z = h
b.o = f
b.x = e
b.s = i
l.s = k
l.z = k
l.q = e
f.o = b
f.v = e
f.s = a
f.t = i
f.y = i
e.z = h
e.o = f
e.x = b
e.s = i
a.o = e
a.v = e
a.s = f
a.t = i
a.y = i
assert h.u.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: D = None
        self.o: D = None
        self.s: E = None
        self.u: D = None
        self.z: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.x: E = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.s: G = None
        self.t: C = None
        self.y: C = None
        self.txt = txt

n = A("n")
k = B("k")
i = C("i")
h = D("h")
b = E("b")
l = F("l")
f = G("f")
e = E("e")
a = G("a")

n.r = l
n.t = h
n.o = h
n.u = h
n.z = h
n.x = h
n.s = b
k.p = f
i.o = e
i.v = k
i.u = h
h.u = n
b.z = h
b.o = f
b.x = e
b.s = i
l.s = k
l.z = k
l.q = e
f.o = b
f.v = e
f.s = a
f.t = i
f.y = i
e.z = h
e.o = f
e.x = b
e.s = i
a.o = e
a.v = e
a.s = f
a.t = i
a.y = i
assert h.u.s.z.txt == "h"