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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.q: H = None
        self.t: G = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.r: I = None
        self.w: H = None
        self.v: J = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: E = None
        self.t: C = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.q: H = None
        self.t: G = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.r: I = None
        self.w: H = None
        self.v: J = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: E = None
        self.t: C = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

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

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