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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.p: A = None
        self.y: H = None
        self.z: E = None
        self.t: E = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.t: G = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.p: A = None
        self.y: H = None
        self.z: E = None
        self.t: E = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.t: G = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: B = None
        self.txt = txt

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

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

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