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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.r: G = None
        self.t: A = None
        self.p: I = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.w: D = None
        self.q: B = None
        self.x: E = None
        self.v: J = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.r: G = None
        self.t: A = None
        self.p: I = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.w: D = None
        self.q: B = None
        self.x: E = None
        self.v: J = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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