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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.z: G = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.x: F = None
        self.s: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.o: F = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.z: G = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.x: F = None
        self.s: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.o: F = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

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