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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.z: A = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: E = None
        self.txt = txt

n = A("n")
i = B("i")
g = C("g")
e = D("e")
k = E("k")
l = F("l")
c = B("c")
h = B("h")
a = C("a")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.z: A = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: E = None
        self.txt = txt

n = A("n")
i = B("i")
g = C("g")
e = D("e")
k = E("k")
l = F("l")
c = B("c")
h = B("h")
a = C("a")

n.r = l
n.o = e
n.v = k
n.t = k
i.s = e
i.z = a
g.x = e
g.t = e
g.z = n
g.q = n
g.r = n
g.p = c
e.y = k
e.o = k
e.z = n
e.p = l
e.s = l
k.x = h
k.t = c
k.q = n
k.w = e
l.v = h
l.r = k
c.s = e
c.z = g
h.s = e
h.z = g
a.x = e
a.t = e
a.z = n
a.q = n
a.r = n
a.p = c
assert h.s.s.v.txt == "h"