class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: F = None
        self.x: I = None
        self.o: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.v: A = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: E = None
        self.t: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.u: J = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.v: A = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: E = None
        self.t: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: D = None
        self.u: J = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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