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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.z: F = None
        self.w: I = None
        self.x: B = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.w: E = None
        self.z: G = None
        self.t: E = None
        self.p: B = None
        self.x: I = None
        self.r: H = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.p: C = None
        self.z: B = None
        self.t: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: H = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.z: F = None
        self.w: I = None
        self.x: B = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.w: E = None
        self.z: G = None
        self.t: E = None
        self.p: B = None
        self.x: I = None
        self.r: H = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.p: C = None
        self.z: B = None
        self.t: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: H = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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