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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.y: I = None
        self.p: F = None
        self.q: A = None
        self.u: H = None
        self.r: F = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.y: I = None
        self.p: F = None
        self.q: A = None
        self.u: H = None
        self.r: F = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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