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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.u: D = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.u: D = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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