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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.t: G = None
        self.u: G = None
        self.q: I = None
        self.p: A = 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.w: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: I = None
        self.t: D = None
        self.x: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.t: G = None
        self.u: G = None
        self.q: I = None
        self.p: A = 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.w: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: I = None
        self.t: D = None
        self.x: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

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