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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: F = None
        self.w: H = None
        self.t: J = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.v: D = None
        self.s: G = None
        self.r: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: B = None
        self.y: G = None
        self.v: H = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.s: E = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.t: E = None
        self.u: C = None
        self.o: B = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: F = None
        self.w: H = None
        self.t: J = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.v: D = None
        self.s: G = None
        self.r: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: B = None
        self.y: G = None
        self.v: H = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.s: E = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.t: E = None
        self.u: C = None
        self.o: B = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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