class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.v: G = None
        self.t: C = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.x: H = None
        self.v: E = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.x: H = None
        self.v: E = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

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

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

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