class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.y: E = None
        self.p: B = None
        self.s: B = None
        self.u: C = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.s: G = None
        self.q: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.v: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.txt = txt

h = A("h")
e = B("e")
c = C("c")
m = D("m")
k = E("k")
b = F("b")
l = G("l")
n = C("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.s: G = None
        self.q: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.v: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.txt = txt

h = A("h")
e = B("e")
c = C("c")
m = D("m")
k = E("k")
b = F("b")
l = G("l")
n = C("n")

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