class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: F = None
        self.o: I = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.q: G = None
        self.u: I = None
        self.v: I = None
        self.s: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.o: H = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: I = None
        self.y: G = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: F = None
        self.o: I = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.q: G = None
        self.u: I = None
        self.v: I = None
        self.s: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.o: H = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: I = None
        self.y: G = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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