class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.v: E = None
        self.s: C = None
        self.q: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: H = None
        self.u: G = None
        self.v: B = None
        self.w: C = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.p: C = None
        self.x: B = None
        self.o: H = None
        self.w: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.v: E = None
        self.s: C = None
        self.q: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: H = None
        self.u: G = None
        self.v: B = None
        self.w: C = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.p: C = None
        self.x: B = None
        self.o: H = None
        self.w: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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