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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.u: E = None
        self.v: A = None
        self.r: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.u: E = None
        self.v: A = None
        self.r: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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