class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.v: H = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: I = None
        self.v: H = None
        self.t: F = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: B = None
        self.z: J = None
        self.t: H = None
        self.x: J = None
        self.o: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: I = None
        self.s: B = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.w: E = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: G = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: I = None
        self.v: H = None
        self.t: F = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: B = None
        self.z: J = None
        self.t: H = None
        self.x: J = None
        self.o: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: I = None
        self.s: B = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.w: E = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: G = None
        self.x: E = None
        self.txt = txt

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

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