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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.q: F = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.z: G = None
        self.q: B = None
        self.u: F = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

c = A("c")
n = B("n")
a = C("a")
d = D("d")
k = E("k")
e = F("e")
j = G("j")
h = A("h")
g = E("g")
i = G("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.q: F = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.z: G = None
        self.q: B = None
        self.u: F = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

c = A("c")
n = B("n")
a = C("a")
d = D("d")
k = E("k")
e = F("e")
j = G("j")
h = A("h")
g = E("g")
i = G("i")

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