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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

b = A("b")
e = B("e")
n = C("n")
a = D("a")
f = E("f")
c = F("c")
g = G("g")
j = C("j")
d = F("d")
h = F("h")

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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

b = A("b")
e = B("e")
n = C("n")
a = D("a")
f = E("f")
c = F("c")
g = G("g")
j = C("j")
d = F("d")
h = F("h")

b.s = g
b.p = f
b.q = c
e.s = b
e.w = b
e.v = a
e.p = n
e.r = n
e.x = f
n.s = j
a.x = f
a.t = f
a.y = e
a.o = e
f.s = g
f.u = a
c.p = a
c.r = a
c.v = e
c.y = b
g.q = f
g.p = a
g.y = e
g.v = n
j.s = n
d.p = a
d.r = a
d.v = e
d.y = b
h.p = a
h.r = a
h.v = e
h.y = b
assert e.s.s.y.txt == "e"