class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: B = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.s: G = None
        self.y: H = None
        self.x: E = None
        self.w: C = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.z: H = None
        self.t: G = None
        self.o: A = None
        self.p: I = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: B = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.s: G = None
        self.y: H = None
        self.x: E = None
        self.w: C = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.z: H = None
        self.t: G = None
        self.o: A = None
        self.p: I = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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