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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.u: D = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.o: A = None
        self.q: J = None
        self.p: B = None
        self.s: E = None
        self.x: F = None
        self.t: G = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.r: C = None
        self.x: I = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.u: D = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.o: A = None
        self.q: J = None
        self.p: B = None
        self.s: E = None
        self.x: F = None
        self.t: G = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.r: C = None
        self.x: I = None
        self.u: G = None
        self.txt = txt

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

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