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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.r: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.v: E = None
        self.o: E = None
        self.p: G = None
        self.z: D = None
        self.t: E = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.q: I = None
        self.p: D = None
        self.t: A = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.u: F = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.r: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.v: E = None
        self.o: E = None
        self.p: G = None
        self.z: D = None
        self.t: E = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.q: I = None
        self.p: D = None
        self.t: A = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.u: F = None
        self.p: G = None
        self.txt = txt

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

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