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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.q: A = None
        self.z: F = None
        self.r: G = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.x: C = None
        self.q: J = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.q: A = None
        self.z: F = None
        self.r: G = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.x: C = None
        self.q: J = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

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

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

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