class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: G = None
        self.s: D = None
        self.w: A = None
        self.u: F = None
        self.o: A = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.t: A = None
        self.y: F = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: B = None
        self.y: A = None
        self.t: E = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.t: A = None
        self.y: F = None
        self.r: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: B = None
        self.y: A = None
        self.t: E = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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