class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.s: D = None
        self.r: A = None
        self.z: G = None
        self.w: E = None
        self.t: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.r: C = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.y: D = None
        self.v: B = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.r: C = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.y: D = None
        self.v: B = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.v: E = None
        self.txt = txt

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

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