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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.s: A = None
        self.y: D = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.q: B = None
        self.w: C = None
        self.y: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.z: B = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.s: A = None
        self.y: D = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.q: B = None
        self.w: C = None
        self.y: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.z: B = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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

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