class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.w: G = None
        self.x: G = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.r: I = None
        self.u: A = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: J = None
        self.x: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.w: A = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: C = None
        self.q: H = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.w: G = None
        self.x: G = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.r: I = None
        self.u: A = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: J = None
        self.x: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.w: A = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: C = None
        self.q: H = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

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

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