class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.u: B = None
        self.t: B = None
        self.q: G = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

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