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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: D = None
        self.y: B = None
        self.t: G = None
        self.p: D = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.t: I = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.y: A = None
        self.u: E = None
        self.x: D = None
        self.r: D = None
        self.t: E = None
        self.p: C = None
        self.txt = txt

g = A("g")
c = B("c")
l = C("l")
i = D("i")
h = E("h")
b = F("b")
f = G("f")
n = H("n")
k = I("k")

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: D = None
        self.y: B = None
        self.t: G = None
        self.p: D = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.t: I = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.y: A = None
        self.u: E = None
        self.x: D = None
        self.r: D = None
        self.t: E = None
        self.p: C = None
        self.txt = txt

g = A("g")
c = B("c")
l = C("l")
i = D("i")
h = E("h")
b = F("b")
f = G("f")
n = H("n")
k = I("k")

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