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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: B = None
        self.x: D = None
        self.w: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.q: J = None
        self.w: H = None
        self.s: H = None
        self.z: C = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.w: A = None
        self.u: F = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: F = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.u: B = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: B = None
        self.x: D = None
        self.w: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.q: J = None
        self.w: H = None
        self.s: H = None
        self.z: C = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.w: A = None
        self.u: F = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: F = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.u: B = None
        self.z: I = None
        self.txt = txt

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

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