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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.u: E = None
        self.y: E = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

f = A("f")
l = B("l")
h = C("h")
a = D("a")
b = E("b")
e = F("e")
n = G("n")
d = H("d")
g = H("g")
i = E("i")

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.u: E = None
        self.y: E = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

f = A("f")
l = B("l")
h = C("h")
a = D("a")
b = E("b")
e = F("e")
n = G("n")
d = H("d")
g = H("g")
i = E("i")

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