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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.s: G = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.s: G = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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