class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: J = None
        self.y: G = None
        self.s: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: A = None
        self.y: I = None
        self.q: F = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.p: J = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.o: B = None
        self.p: B = None
        self.v: F = None
        self.u: H = None
        self.z: J = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: A = None
        self.y: I = None
        self.q: F = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.p: J = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.o: B = None
        self.p: B = None
        self.v: F = None
        self.u: H = None
        self.z: J = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

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