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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: H = None
        self.s: I = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: F = None
        self.o: F = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

g = A("g")
e = B("e")
b = C("b")
m = D("m")
h = E("h")
j = F("j")
n = G("n")
k = H("k")
d = I("d")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: H = None
        self.s: I = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: F = None
        self.o: F = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

g = A("g")
e = B("e")
b = C("b")
m = D("m")
h = E("h")
j = F("j")
n = G("n")
k = H("k")
d = I("d")
l = J("l")

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