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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.t: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

e.z = j
e.q = j
e.x = j
e.r = g
a.s = j
a.o = e
a.r = e
a.x = b
d.x = h
d.o = l
d.t = b
d.z = a
d.y = a
j.t = e
j.x = g
j.r = g
g.y = a
g.p = j
g.s = b
h.s = g
b.y = a
b.r = e
b.z = e
b.p = e
b.o = h
b.q = h
b.x = d
l.x = h
l.o = d
l.t = b
l.z = a
l.y = a
assert g.y.o.z.x.s.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: D = None
        self.r: E = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.t: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

e.z = j
e.q = j
e.x = j
e.r = g
a.s = j
a.o = e
a.r = e
a.x = b
d.x = h
d.o = l
d.t = b
d.z = a
d.y = a
j.t = e
j.x = g
j.r = g
g.y = a
g.p = j
g.s = b
h.s = g
b.y = a
b.r = e
b.z = e
b.p = e
b.o = h
b.q = h
b.x = d
l.x = h
l.o = d
l.t = b
l.z = a
l.y = a
assert g.y.o.z.x.s.o.s.txt == "g"