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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.y: H = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

g.s = h
g.t = k
g.q = f
g.z = d
g.p = d
g.x = d
g.w = c
g.r = m
g.o = m
c.s = l
c.x = k
k.o = h
l.q = g
l.v = i
l.y = j
l.p = m
h.z = g
h.s = i
h.w = k
d.p = k
d.z = k
d.s = g
d.o = c
d.y = i
d.r = h
i.p = l
i.z = f
j.x = k
m.z = g
m.s = c
m.r = j
m.v = h
m.w = h
m.x = i
m.y = k
f.q = m
f.t = k
assert h.s.p.p.v.w.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.q: J = None
        self.z: F = None
        self.w: B = None
        self.r: I = None
        self.p: F = None
        self.x: F = None
        self.o: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.y: H = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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