class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.p: B = None
        self.x: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
c = B("c")
n = C("n")
j = D("j")
g = E("g")
k = F("k")
l = G("l")
m = E("m")
e = A("e")
a = C("a")

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

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

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

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

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

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

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

f = A("f")
c = B("c")
n = C("n")
j = D("j")
g = E("g")
k = F("k")
l = G("l")
m = E("m")
e = A("e")
a = C("a")

f.o = j
f.u = j
f.s = g
f.p = c
f.x = n
c.q = k
n.s = j
n.r = l
n.y = a
j.p = l
j.q = l
j.z = c
j.v = k
j.y = n
g.y = f
k.t = l
k.o = l
k.r = l
k.z = c
k.u = j
k.s = e
k.y = f
l.r = c
m.y = e
e.o = j
e.u = j
e.s = m
e.p = c
e.x = n
a.s = j
a.r = l
a.y = n
assert g.y.u.q.r.q.s.s.y.x.txt == "n"