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

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

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

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

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

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

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

n = A("n")
m = B("m")
j = C("j")
h = D("h")
d = E("d")
l = F("l")
i = G("i")
c = D("c")

n.w = i
n.s = i
n.x = i
n.p = m
n.t = m
n.v = c
n.q = c
m.q = n
m.s = i
j.s = m
j.p = n
h.w = m
h.p = m
h.y = m
h.u = d
h.r = j
h.x = n
h.z = l
d.x = i
d.z = c
d.u = n
l.x = m
l.y = n
l.z = d
i.o = l
i.s = l
i.w = d
i.t = j
i.p = m
i.v = c
i.q = c
c.w = m
c.p = m
c.y = m
c.u = d
c.r = j
c.x = n
c.z = l
assert h.x.p.s.q.r.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.s: G = None
        self.t: B = None
        self.x: G = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

n = A("n")
m = B("m")
j = C("j")
h = D("h")
d = E("d")
l = F("l")
i = G("i")
c = D("c")

n.w = i
n.s = i
n.x = i
n.p = m
n.t = m
n.v = c
n.q = c
m.q = n
m.s = i
j.s = m
j.p = n
h.w = m
h.p = m
h.y = m
h.u = d
h.r = j
h.x = n
h.z = l
d.x = i
d.z = c
d.u = n
l.x = m
l.y = n
l.z = d
i.o = l
i.s = l
i.w = d
i.t = j
i.p = m
i.v = c
i.q = c
c.w = m
c.p = m
c.y = m
c.u = d
c.r = j
c.x = n
c.z = l
assert h.x.p.s.q.r.s.q.txt == "n"