class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.t: H = None
        self.s: D = None
        self.w: C = None
        self.r: D = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.p: E = None
        self.x: G = None
        self.w: F = None
        self.y: F = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: H = None
        self.w: E = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.y: B = None
        self.z: B = None
        self.p: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.t: H = None
        self.s: D = None
        self.w: C = None
        self.r: D = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.p: E = None
        self.x: G = None
        self.w: F = None
        self.y: F = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: H = None
        self.w: E = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.y: B = None
        self.z: B = None
        self.p: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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