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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: F = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: J = None
        self.x: B = None
        self.t: F = None
        self.v: D = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.p: F = None
        self.z: G = None
        self.u: G = None
        self.w: D = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.q: C = None
        self.o: B = None
        self.y: D = None
        self.u: H = None
        self.t: H = None
        self.s: C = None
        self.z: H = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.s: E = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

g = A("g")
e = B("e")
i = C("i")
f = D("f")
k = E("k")
h = F("h")
a = G("a")
b = H("b")
c = I("c")
d = J("d")

g.r = h
g.q = c
g.u = k
e.s = b
e.x = h
e.t = h
e.w = f
i.q = d
i.z = d
i.x = e
i.t = h
i.v = f
i.r = c
f.r = d
k.r = f
k.q = f
k.w = f
k.p = h
k.z = a
k.u = a
k.v = a
k.x = c
h.q = i
h.u = c
a.w = g
a.v = k
a.q = i
a.s = i
a.x = i
a.o = e
a.y = f
a.u = b
a.t = b
a.z = b
b.z = f
c.p = i
c.u = f
c.z = f
c.q = k
c.o = d
c.w = b
c.r = b
c.s = e
d.q = a
d.u = g
d.s = k
d.t = b
d.p = b
assert h.u.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: F = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: J = None
        self.x: B = None
        self.t: F = None
        self.v: D = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.p: F = None
        self.z: G = None
        self.u: G = None
        self.w: D = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.q: C = None
        self.o: B = None
        self.y: D = None
        self.u: H = None
        self.t: H = None
        self.s: C = None
        self.z: H = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.s: E = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

g = A("g")
e = B("e")
i = C("i")
f = D("f")
k = E("k")
h = F("h")
a = G("a")
b = H("b")
c = I("c")
d = J("d")

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