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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: E = None
        self.q: C = None
        self.p: H = None
        self.w: D = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.z: F = None
        self.x: D = None
        self.r: J = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.q: F = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

e = A("e")
f = B("f")
l = C("l")
j = D("j")
c = E("c")
m = F("m")
h = G("h")
b = H("b")
d = I("d")
i = J("i")

e.r = h
e.o = i
e.q = m
e.y = m
e.x = m
e.v = j
e.t = f
f.y = d
f.z = c
f.q = l
f.p = b
f.w = j
f.r = i
l.u = c
l.o = f
l.z = m
l.s = m
l.q = m
l.x = j
l.r = i
j.z = l
j.o = l
j.s = c
j.t = c
j.p = d
j.u = d
j.w = i
j.x = m
j.y = e
j.q = e
c.w = f
c.v = e
c.t = h
m.u = i
h.x = m
h.q = d
b.u = c
b.z = i
d.p = h
i.x = j
i.t = j
i.q = m
i.o = m
i.y = h
assert b.z.q.u.y.x.u.q.u.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: J = None
        self.q: F = None
        self.y: F = None
        self.x: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: E = None
        self.q: C = None
        self.p: H = None
        self.w: D = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.z: F = None
        self.x: D = None
        self.r: J = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.q: F = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

e = A("e")
f = B("f")
l = C("l")
j = D("j")
c = E("c")
m = F("m")
h = G("h")
b = H("b")
d = I("d")
i = J("i")

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