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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.s: C = None
        self.p: F = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.x: F = None
        self.y: A = None
        self.w: D = None
        self.o: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.o: G = None
        self.s: F = None
        self.y: G = None
        self.v: G = None
        self.txt = txt

j = A("j")
h = B("h")
e = C("e")
d = D("d")
b = E("b")
k = F("k")
a = G("a")
g = A("g")
n = G("n")
i = G("i")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.s: C = None
        self.p: F = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.x: F = None
        self.y: A = None
        self.w: D = None
        self.o: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.o: G = None
        self.s: F = None
        self.y: G = None
        self.v: G = None
        self.txt = txt

j = A("j")
h = B("h")
e = C("e")
d = D("d")
b = E("b")
k = F("k")
a = G("a")
g = A("g")
n = G("n")
i = G("i")

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