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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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