class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.t: H = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.v: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: C = None
        self.x: C = None
        self.v: C = None
        self.w: J = None
        self.y: D = None
        self.r: G = None
        self.z: D = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.y: J = None
        self.v: H = None
        self.t: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.v: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: C = None
        self.x: C = None
        self.v: C = None
        self.w: J = None
        self.y: D = None
        self.r: G = None
        self.z: D = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.y: J = None
        self.v: H = None
        self.t: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

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

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