class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: H = None
        self.q: B = None
        self.v: G = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.y: G = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.y: G = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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