class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: D = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: D = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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