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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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