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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.p: A = None
        self.z: E = None
        self.u: F = None
        self.q: C = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.p: A = None
        self.z: E = None
        self.u: F = None
        self.q: C = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

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

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