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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: I = None
        self.u: B = None
        self.r: H = None
        self.q: G = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.t: A = None
        self.w: J = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.t: C = None
        self.q: J = None
        self.w: E = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

a = A("a")
k = B("k")
g = C("g")
d = D("d")
j = E("j")
i = F("i")
m = G("m")
f = H("f")
b = I("b")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: I = None
        self.u: B = None
        self.r: H = None
        self.q: G = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.t: A = None
        self.w: J = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.t: C = None
        self.q: J = None
        self.w: E = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

a = A("a")
k = B("k")
g = C("g")
d = D("d")
j = E("j")
i = F("i")
m = G("m")
f = H("f")
b = I("b")
l = J("l")

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