class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: J = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.z: F = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.y: B = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.s: B = None
        self.p: D = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.v: F = None
        self.w: A = None
        self.y: D = None
        self.s: H = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.z: F = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.y: B = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.s: B = None
        self.p: D = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.v: F = None
        self.w: A = None
        self.y: D = None
        self.s: H = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

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

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

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