class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: F = None
        self.t: J = None
        self.v: B = None
        self.q: E = None
        self.s: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.q: E = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: E = None
        self.z: F = None
        self.y: B = None
        self.o: H = None
        self.w: A = None
        self.x: B = None
        self.q: A = None
        self.r: F = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.q: E = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: E = None
        self.z: F = None
        self.y: B = None
        self.o: H = None
        self.w: A = None
        self.x: B = None
        self.q: A = None
        self.r: F = None
        self.v: E = None
        self.txt = txt

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

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