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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.x: A = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.x: A = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

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

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