class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: I = None
        self.u: D = None
        self.q: H = None
        self.p: G = None
        self.w: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: H = None
        self.v: J = None
        self.y: H = None
        self.p: J = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.x: J = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: H = None
        self.v: J = None
        self.y: H = None
        self.p: J = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.x: J = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

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