class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.p: F = None
        self.u: I = None
        self.r: J = None
        self.y: E = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.y: J = None
        self.s: F = None
        self.u: A = None
        self.o: C = None
        self.w: E = None
        self.p: B = None
        self.v: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.y: J = None
        self.s: F = None
        self.u: A = None
        self.o: C = None
        self.w: E = None
        self.p: B = None
        self.v: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

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