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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.y: A = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.y: A = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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