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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.s: G = None
        self.t: G = None
        self.u: G = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.q: B = None
        self.o: A = None
        self.x: D = None
        self.w: A = None
        self.txt = txt

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

n.o = a
n.t = a
n.r = j
n.s = g
c.r = j
c.w = g
c.s = g
c.x = f
c.y = l
c.o = n
g.v = c
g.y = f
f.y = a
f.v = n
f.q = n
f.s = j
f.t = j
f.u = j
f.r = j
a.u = n
a.r = c
a.s = c
a.t = j
a.x = j
a.q = l
l.u = f
j.t = n
j.o = n
j.w = n
j.u = l
j.q = c
j.x = f
assert n.s.y.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.r: G = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.s: G = None
        self.t: G = None
        self.u: G = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.q: B = None
        self.o: A = None
        self.x: D = None
        self.w: A = None
        self.txt = txt

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

n.o = a
n.t = a
n.r = j
n.s = g
c.r = j
c.w = g
c.s = g
c.x = f
c.y = l
c.o = n
g.v = c
g.y = f
f.y = a
f.v = n
f.q = n
f.s = j
f.t = j
f.u = j
f.r = j
a.u = n
a.r = c
a.s = c
a.t = j
a.x = j
a.q = l
l.u = f
j.t = n
j.o = n
j.w = n
j.u = l
j.q = c
j.x = f
assert n.s.y.y.x.txt == "j"