class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: B = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: A = None
        self.u: D = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.u: I = None
        self.y: J = None
        self.q: I = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: J = None
        self.u: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.z: F = None
        self.u: F = None
        self.o: I = None
        self.v: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.q: D = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: A = None
        self.u: D = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.u: I = None
        self.y: J = None
        self.q: I = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: J = None
        self.u: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.z: F = None
        self.u: F = None
        self.o: I = None
        self.v: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.q: D = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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