class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: G = None
        self.u: B = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.u: J = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.r: J = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

f.q = j
f.t = j
f.r = k
f.s = b
l.r = h
l.t = a
j.s = n
n.r = a
n.s = h
n.u = c
a.v = c
a.z = k
a.r = k
a.u = l
a.s = b
b.q = k
k.q = f
k.v = f
k.u = f
k.p = h
k.s = e
k.t = j
k.w = n
k.x = c
k.r = b
e.r = j
e.s = f
e.w = f
e.u = c
h.u = n
h.x = l
h.y = l
h.r = c
c.x = n
c.y = a
assert n.s.r.y.r.s.u.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: G = None
        self.u: B = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.u: J = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.r: J = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

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