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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: A = None
        self.x: B = None
        self.u: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.q: A = None
        self.x: B = None
        self.u: F = None
        self.v: C = None
        self.txt = txt

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

n.y = j
n.p = g
a.s = k
a.v = i
j.u = m
j.y = d
j.w = g
j.p = l
m.r = n
m.u = d
m.w = k
k.y = g
k.v = n
g.q = l
g.r = k
l.y = n
l.w = n
l.q = n
l.x = i
l.u = g
l.v = j
d.y = n
d.w = n
d.q = n
d.x = i
d.u = g
d.v = j
i.s = k
i.v = a
assert l.u.q.y.p.q.u.r.v.txt == "n"