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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: G = None
        self.txt = txt

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

f.s = k
f.x = b
g.y = k
g.s = a
l.o = b
l.w = b
l.x = g
l.z = g
l.s = c
l.q = a
l.u = k
c.q = b
c.y = a
c.w = a
c.z = k
c.s = f
c.p = m
a.o = g
a.y = f
a.x = m
a.v = c
b.s = k
b.p = a
m.x = a
m.p = k
k.x = a
k.p = m
n.y = k
n.s = a
assert n.s.v.y.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: G = None
        self.txt = txt

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

f.s = k
f.x = b
g.y = k
g.s = a
l.o = b
l.w = b
l.x = g
l.z = g
l.s = c
l.q = a
l.u = k
c.q = b
c.y = a
c.w = a
c.z = k
c.s = f
c.p = m
a.o = g
a.y = f
a.x = m
a.v = c
b.s = k
b.p = a
m.x = a
m.p = k
k.x = a
k.p = m
n.y = k
n.s = a
assert n.s.v.y.x.x.txt == "a"