class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.q: F = None
        self.s: G = None
        self.v: I = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: G = None
        self.y: I = None
        self.s: G = None
        self.q: B = None
        self.t: B = None
        self.v: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

h.r = b
h.x = b
h.q = f
h.s = a
h.v = n
h.o = g
h.y = c
k.x = f
k.q = g
k.p = h
m.r = g
b.x = c
g.p = c
g.o = a
g.s = a
g.y = n
g.v = n
g.z = n
g.q = k
g.t = k
f.o = e
a.r = h
a.t = k
a.v = k
a.s = m
a.z = b
a.q = b
c.r = a
c.q = k
n.y = b
n.v = g
n.u = g
n.r = k
n.o = k
n.p = f
n.z = c
n.t = h
e.y = b
e.v = g
e.u = g
e.r = k
e.o = k
e.p = f
e.z = c
e.t = h
assert h.y.r.t.x.o.z.q.q.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.q: F = None
        self.s: G = None
        self.v: I = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: G = None
        self.y: I = None
        self.s: G = None
        self.q: B = None
        self.t: B = None
        self.v: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

h.r = b
h.x = b
h.q = f
h.s = a
h.v = n
h.o = g
h.y = c
k.x = f
k.q = g
k.p = h
m.r = g
b.x = c
g.p = c
g.o = a
g.s = a
g.y = n
g.v = n
g.z = n
g.q = k
g.t = k
f.o = e
a.r = h
a.t = k
a.v = k
a.s = m
a.z = b
a.q = b
c.r = a
c.q = k
n.y = b
n.v = g
n.u = g
n.r = k
n.o = k
n.p = f
n.z = c
n.t = h
e.y = b
e.v = g
e.u = g
e.r = k
e.o = k
e.p = f
e.z = c
e.t = h
assert h.y.r.t.x.o.z.q.q.t.p.txt == "h"