class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: I = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: J = None
        self.y: D = None
        self.p: C = None
        self.w: F = None
        self.x: A = None
        self.t: A = None
        self.z: J = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: J = None
        self.y: D = None
        self.p: C = None
        self.w: F = None
        self.x: A = None
        self.t: A = None
        self.z: J = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: I = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.z: C = None
        self.txt = txt

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

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

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