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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.p: A = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.p: A = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

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